from typing import Literal

DARKER_COLOR = [
    [
        [0.9677975592919913, 0.44127456009157356, 0.5358103155058701],
        [0.8798159629927194, 0.4011586909923396, 0.48710028682351825],
        [0.7918343666934474, 0.36104282189310566, 0.43839025814116644],
        [0.7038527703941755, 0.3209269527938717, 0.38968022945881464],
        [0.6158711740949036, 0.2808110836946377, 0.3409702007764628],
        [0.5278895777956316, 0.24069521459540377, 0.292260172094111],
        [0.4399079814963597, 0.20057934549616982, 0.24355014341175918],
        [0.35192638519708774, 0.16046347639693587, 0.19484011472940732],
    ],
    [
        [0.8087954113106306, 0.5634700050056693, 0.19502642696727285],
        [0.735268555736937, 0.512245459096063, 0.17729675178842985],
        [0.6617417001632432, 0.46102091318645677, 0.15956707660958688],
        [0.5882148445895495, 0.4097963672768504, 0.1418374014307439],
        [0.5146879890158558, 0.35857182136724414, 0.1241077262519009],
        [0.4411611334421622, 0.30734727545763785, 0.10637805107305792],
        [0.3676342778684685, 0.25612272954803156, 0.08864837589421494],
        [0.2941074222947748, 0.2048981836384252, 0.07091870071537194],
    ],
    [
        [0.5920891529639701, 0.6418467016378244, 0.1935069134991043],
        [0.5382628663308819, 0.5834970014889312, 0.17591537590827663],
        [0.48443657969779375, 0.5251473013400382, 0.15832383831744895],
        [0.43061029306470555, 0.46679760119114505, 0.1407323007266213],
        [0.37678400643161736, 0.4084479010422519, 0.12314076313579364],
        [0.32295771979852916, 0.3500982008933588, 0.10554922554496597],
        [0.26913143316544097, 0.2917485007444657, 0.08795768795413832],
        [0.21530514653235278, 0.2333988005955725, 0.07036615036331065],
    ],
    [
        [0.19783576093349015, 0.6955516966063037, 0.3995301037444499],
        [0.1798506917577183, 0.6323197241875488, 0.36320918522222717],
        [0.16186562258194648, 0.5690877517687939, 0.3268882667000045],
        [0.14388055340617467, 0.5058557793500391, 0.29056734817778174],
        [0.1258954842304028, 0.44262380693128417, 0.254246429655559],
        [0.10791041505463099, 0.3793918345125293, 0.21792551113333633],
        [0.08992534587885917, 0.31615986209377445, 0.1816045926111136],
        [0.07194027670308734, 0.2529278896750195, 0.14528367408889087],
    ],
    [
        [0.21044753832183283, 0.6773105080456748, 0.6433941168468681],
        [0.19131594392893894, 0.615736825496068, 0.5849037425880619],
        [0.17218434953604506, 0.5541631429464612, 0.5264133683292557],
        [0.15305275514315114, 0.4925894603968545, 0.46792299407044957],
        [0.13392116075025726, 0.43101577784724765, 0.40943261981164336],
        [0.11478956635736337, 0.3694420952976408, 0.35094224555283715],
        [0.09565797196446947, 0.30786841274803406, 0.292451871294031],
        [0.07652637757157557, 0.24629473019842724, 0.23396149703522479],
    ],
    [
        [0.22335772267769388, 0.6565792317435265, 0.8171355503265633],
        [0.2030524751615399, 0.5968902106759332, 0.7428505002968757],
        [0.1827472276453859, 0.5372011896083398, 0.668565450267188],
        [0.16244198012923192, 0.4775121685407466, 0.5942804002375006],
        [0.1421367326130779, 0.4178231474731532, 0.519995350207813],
        [0.12183148509692394, 0.3581341264055599, 0.4457103001781254],
        [0.10152623758076995, 0.29844510533796664, 0.37142525014843786],
        [0.08122099006461597, 0.23875608427037326, 0.2971402001187503],
    ],
    [
        [0.6423044349219739, 0.5497680051256467, 0.9582651433656727],
        [0.5839131226563399, 0.4997890955687697, 0.8711501303324297],
        [0.5255218103907059, 0.44981018601189277, 0.7840351172991867],
        [0.4671304981250719, 0.3998312764550158, 0.6969201042659439],
        [0.4087391858594379, 0.3498523668981388, 0.6098050912327009],
        [0.3503478735938039, 0.29987345734126186, 0.5226900781994579],
        [0.29195656132816994, 0.2498945477843849, 0.4355750651662149],
        [0.23356524906253595, 0.1999156382275079, 0.34846005213297193],
    ],
    [
        [0.9603888539940703, 0.3814317878772117, 0.8683117650835491],
        [0.8730807763582457, 0.3467561707974652, 0.7893743318941355],
        [0.7857726987224212, 0.3120805537177187, 0.710436898704722],
        [0.6984646210865966, 0.27740493663797217, 0.6314994655153084],
        [0.611156543450772, 0.24272931955822563, 0.5525620323258948],
        [0.5238484658149474, 0.20805370247847912, 0.47362459913648136],
        [0.4365403881791229, 0.17337808539873262, 0.3946871659470678],
        [0.3492323105432983, 0.13870246831898608, 0.3157497327576543],
    ],
]
LIGHTER_COLOR = [
    [
        [0.9827980263616191, 0.769638396807775, 0.7970531728564593],
        [0.8934527512378355, 0.69967126982525, 0.724593793505872],
        [0.804107476114052, 0.629704142842725, 0.6521344141552848],
        [0.7147622009902684, 0.5597370158602, 0.5796750348046977],
        [0.6254169258664848, 0.489769888877675, 0.5072156554541105],
        [0.5360716507427012, 0.41980276189515003, 0.43475627610352324],
        [0.4467263756189178, 0.34983563491262504, 0.3622968967529361],
        [0.35738110049513416, 0.27986850793010004, 0.28983751740234887],
    ],
    [
        [0.9840164069614173, 0.7871591495642142, 0.590047954414131],
        [0.8945603699649248, 0.7155992268765583, 0.5364072312855737],
        [0.8051043329684324, 0.6440393041889025, 0.4827665081570163],
        [0.7156482959719399, 0.5724793815012467, 0.429125785028459],
        [0.6261922589754474, 0.5009194588135908, 0.3754850618999016],
        [0.5367362219789549, 0.429359536125935, 0.3218443387713442],
        [0.44728018498246247, 0.3577996134382792, 0.2682036156427869],
        [0.35782414798596995, 0.2862396907506234, 0.2145628925142295],
    ],
    [
        [0.7972077130694543, 0.8627377355849891, 0.27228026341497236],
        [0.7247342846085948, 0.7843070323499901, 0.2475275121954294],
        [0.6522608561477353, 0.7058763291149911, 0.22277476097588647],
        [0.5797874276868759, 0.6274456258799921, 0.19802200975634354],
        [0.5073139992260163, 0.5490149226449931, 0.17326925853680059],
        [0.43484057076515686, 0.47058421940999406, 0.14851650731725766],
        [0.3623671423042974, 0.3921535161749951, 0.12376375609771473],
        [0.2898937138434379, 0.31372281293999604, 0.09901100487817177],
    ],
    [
        [0.2779812972762074, 0.9334664917893793, 0.5436100345818154],
        [0.25271027025109766, 0.8486059016267085, 0.49419094052892315],
        [0.22743924322598788, 0.7637453114640377, 0.44477184647603085],
        [0.2021682162008781, 0.6788847213013669, 0.3953527524231385],
        [0.17689718917576835, 0.594024131138696, 0.3459336583702462],
        [0.15162616215065858, 0.5091635409760251, 0.2965145643173539],
        [0.12635513512554883, 0.42430295081335434, 0.2470954702644616],
        [0.10108410810043905, 0.33944236065068345, 0.19767637621156925],
    ],
    [
        [0.29459083850654705, 0.9094430917436246, 0.864775660607264],
        [0.26780985318777006, 0.8267664470396587, 0.7861596914611491],
        [0.24102886786899302, 0.7440898023356928, 0.7075437223150342],
        [0.21424788255021604, 0.661413157631727, 0.6289277531689192],
        [0.18746689723143903, 0.5787365129277611, 0.5503117840228043],
        [0.16068591191266204, 0.4960598682237952, 0.47169581487668943],
        [0.13390492659388503, 0.41338322351982937, 0.3930798457305746],
        [0.10712394127510802, 0.3307065788158635, 0.3144638765844596],
    ],
    [
        [0.6167962713354493, 0.8556412303738589, 0.9814933723421341],
        [0.5607238830322266, 0.7778556639762353, 0.8922667021292128],
        [0.504651494729004, 0.7000700975786118, 0.8030400319162915],
        [0.44857910642578136, 0.6222845311809883, 0.7138133617033702],
        [0.39250671812255866, 0.5444989647833647, 0.624586691490449],
        [0.336434329819336, 0.4667133983857412, 0.5353600212775277],
        [0.2803619415161134, 0.3889278319881177, 0.4461333510646064],
        [0.22428955321289068, 0.3111422655904942, 0.3569066808516851],
    ],
    [
        [0.8346558480918322, 0.8010859779414187, 0.9813749241934401],
        [0.7587780437198475, 0.7282599799467442, 0.8921590219940364],
        [0.6829002393478627, 0.6554339819520698, 0.8029431197946328],
        [0.607022434975878, 0.5826079839573954, 0.7137272175952292],
        [0.5311446306038932, 0.509781985962721, 0.6245113153958255],
        [0.4552668262319085, 0.4369559879680466, 0.5352954131964218],
        [0.3793890218599238, 0.36412998997337215, 0.44607951099701826],
        [0.30351121748793897, 0.2913039919786977, 0.3568636087976146],
    ],
    [
        [0.9817158738610364, 0.7536526868040183, 0.9345919254873484],
        [0.8924689762373058, 0.6851388061854712, 0.8496290231703167],
        [0.8032220786135753, 0.616624925566924, 0.764666120853285],
        [0.7139751809898447, 0.548111044948377, 0.6797032185362534],
        [0.6247282833661141, 0.47959716432982985, 0.5947403162192217],
        [0.5354813857423835, 0.4110832837112827, 0.50977741390219],
        [0.44623448811865296, 0.34256940309273565, 0.42481451158515837],
        [0.35698759049492235, 0.27405552247418846, 0.33985160926812674],
    ],
]


def getColor(category: Literal["+", "-"], base_idx: int, variant: int):
    if category == "+":
        return LIGHTER_COLOR[base_idx % len(LIGHTER_COLOR)][variant]
    elif category == "-":
        return DARKER_COLOR[base_idx % len(LIGHTER_COLOR)][variant]
    raise ValueError(f"Receive unexpected category {category}")
